package com.icbc.cc.api;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class FileSetEncode
 */
public class FileSetEncode extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		String url = request.getParameter("url");
//		StringBuffer sb = new StringBuffer();  
//        for (int i = 0; i < url.length(); i++) {  
//            String s = url.substring(i, i + 1);  
//            byte[] bytes = s.getBytes("gb2312");  
//            if (bytes.length == 1) { // 如果为一个字节则直接加入StringBuffer（中文至少为两个字节，一个字节不可能为中文）  
//                if (bytes[0] == ' ')  
//                    sb.append("%20");  
//                else  
//                    sb.append(s);  
//            } else {  
//                for (int j = 0; j < bytes.length; j++) {  
//                	 sb.append("%" + Integer.toHexString(bytes[j]));    
//                }  
//            }  
//        }  
        response.sendRedirect("http://172.16.6.28:8080/cfsmgmt/uploadfiles/2017/01/19/matlab中如何获取当前日期时间.pdf");
        
	}

}
